package com.imm.net.http.weather

import com.alibaba.fastjson2.JSONObject
import com.imm.net.http.DOMAIN_IMG
import com.imm.net.http.base.BaseHttpFactory

/**
 * <p>------------------------------------------------------
 * <p>Copyright (C) 2020 wasu company, All rights reserved.
 * <p>------------------------------------------------------
 * <p>
 * <p>
 *
 * @author Created by zhangmz
 * @date on 2024/3/22
 */
class WeatherService: BaseHttpFactory(DOMAIN_IMG) {

    private val dao by lazy { create(WeatherDao::class.java) }

    fun queryImg(
        keyword: String,
        success: (url: JSONObject?) -> Unit,
        failure: (e: Throwable) -> Unit = {  }
    ){
        enqueue(dao.queryImg(keyword), success = success, failure = failure)
    }

}